 <link rel="stylesheet" type="text/css" href="../../css/geological/bootstrap.css" />
<div class="modal-body">
	<form id="user-form" name="user-form" class="form-horizontal">
		<div class="box-body">
			<div class="col-md-12">
				<div class="form-group">
					<label for="old_password" class="col-sm-3 control-label">手机号码</label>
					<div class="col-sm-8">
						<input type="text" class="form-control" id="mobile" name="mobile" placeholder="请输入手机号码">
					</div>
				</div>
				<div class="form-group">
					<label for="new_password" class="col-sm-3 control-label">短信内容</label>
					<div class="col-sm-8">
						<input type="text" class="form-control" id="message" name="message" placeholder="请输入短信内容">
					</div>
				</div>
			</div>
		</div>
		<!-- /.box-body -->
		<div class="box-footer text-right">
			<!--以下两种方式提交验证,根据所需选择-->
			<button type="button" class="btn btn-default" data-btn-type="cancel" onclick="dialog_close()">取消操作</button>
			<button type="button" class="btn btn-primary" data-btn-type="save" onclick="send_sms()">发送短信</button>
		</div>
		<!-- /.box-footer -->
	</form>
</div>
<script type="text/javascript">
	$(document).ready(function(){
		
	});
	
	function send_sms( fn ){
		/* var userinfo = {};
		userinfo.password = $("#new_password").val();
		var json_data = JSON.stringify( userinfo ); */
		var url = "../../sms/send";
		$.ajax({
			  url: url,
			  type : 'POST',
			  //async : false,
			  data: {
                  mobile: $("#mobile").val(),
                  message: $("#message").val()
              },
			  contentType: "application/x-www-form-urlencoded; charset=utf-8",
			  dataType: "json",
			  success: function(json) {
				 global.alert( json.message );
				 dialog_close();
			  }
		});
	}

	function dialog_close(){
		global.dialog.close()
	}
</script>